/**
 * 
 */
package info.touret.winecellar.admin.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Element;
import com.google.gwt.dom.client.Style.Overflow;
import com.google.gwt.resources.client.ClientBundle;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.NotStrict;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiFactory;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.RootLayoutPanel;

/**
 * @author touret-a
 * 
 */
public class Admin implements EntryPoint {

	interface Binder extends UiBinder<DockLayoutPanel, Admin> {
	}

	interface GlobalResources extends ClientBundle {
		@NotStrict
		@Source("global.css")
		CssResource css();
	}

	private static final Binder binder = GWT.create(Binder.class);

	/**
	 * 
	 */
	public Admin() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.google.gwt.core.client.EntryPoint#onModuleLoad()
	 */
	@Override
	public void onModuleLoad() {
		GWT.<GlobalResources> create(GlobalResources.class).css()
				.ensureInjected();

		DockLayoutPanel outer = binder.createAndBindUi(this);

		Window.enableScrolling(false);
		Window.setMargin("0px");
		RootLayoutPanel root = RootLayoutPanel.get();
		root.add(outer);
	}

	@UiField(provided = true)
	AdminConsole console = new AdminConsole();

}
